import { createHashRouter } from "react-router-dom";

import ArticleManage from "@/pages/article";
import ColumnManage from "@/pages/column";
import CreatorCenter from "@/pages/creator";
import CreatorHome from "@/pages/creatorHome";
import LoginPage from "@/pages/login";
import NotFound from "@/pages/notFound";
import WebIndex from "@/pages/web";
import WebEditor from "@/pages/editor";
import WebHome from "@/pages/web/pages/home";

const router = createHashRouter([
  {
    path: "/",
    element: <WebIndex />,
    children: [
      {
        path: "",
        index: true,
        element: <WebHome />,
      },
    ],
  },
  {
    path:"/creator",
    element: <CreatorCenter />,
    children:[
      {
        path:"home",
        element: <CreatorHome />
      },
      {
        path:'article',
        element: <ArticleManage />
      },
      {
        path:'column',
        element:  <ColumnManage />
      }

    ]
  },
  {
    path: "/editor",
    element: <WebEditor />,
  },

  {
    path: "/login",
    element: <LoginPage />,
  },
  {
    path: "*",
    element: <NotFound />,
  },
]);

export default router;
